#include <stdio.h>

void main()
{
    int c;
    int arr[4][4] = {{0, 1, 2, 3},
                     {10, 11, 12, 13},
                     {20, 21, 22, 23},
                     {30, 31, 32, 33}};
    printf("The start address of arr is %d\n", arr);

    printf("   arr=%-10d    arr[0]=%-10d  arr[0][0]=%-10d &arr[0][0]=%-10d\n", arr, arr[0], arr[0][0], &arr[0][0]);

    printf("arr[1]=%-10d     arr+1=%-10d  arr[1][0]=%-10d &arr[1][0]=%-10d\n", arr[1], arr + 1, arr[1][0], &arr[1][0]);

    c = &arr[2][0] - &arr[0][0];
    printf("%d\n", c);

    c = arr + 3 - arr;
    printf("%d\n", c);
    c = *(arr + 3) - *arr;
    printf("%d\n", c);

    int *pi = arr;
    int(*pai)[4] = arr;
    printf("%d,%d\n", arr, arr + 3);
    printf("%d,%d\n", arr, *arr + 3);
    printf("pi=%d,%d\n", pi, pi + 3);
    printf("pai=%d,%d\n", pai, pai + 3);

    c = (int)&arr[2][2] - (int)&arr[0][0]; //如果纯地址的差，可以用强制类型转换
    printf("%d\n", c);

    printf("%d\n", arr[2][3]);
    printf("%d\n", *(*(arr + 2) + 3));
}